1. Field of the Invention
The present invention relates to a program writing method of numerical controller, a numerical controller and a cutting machine controlled thereby, especially achieving to control plural axes by plural control programs.
2. Description of the Related Art
It is well known that there are several cutting machines and cutting methods for cutting portions of a workpiece rotatably supported by a headstock and a tailstock. Where a complete circle is formed on a peripheral profile of the cut portions of the rotated workpiece, it is performed relatively simple cutting to infeed gradually a cutting tool toward the workpiece in a perpendicular direction (hereinafter called as “X-axis direction or X-axis”) to a rotated axis (hereinafter called as “C-axis direction or C-axis”) of the workpiece.
However, where a cut position of the peripheral of the workpiece is variable according to a rotational angular position of the workpiece such as non-circular cam surface of a cam shaft, a crankpin of a crankshaft, and so on, it needs quite complex cutting to infeed and retract the cutting tool toward and away from the workpiece along the X-axis according to the rotational angular position of the supported workpiece around the C-axis, so called as a C-X profile motion. The “C-X profile motion” is hereinafter defined as the infeed and retract movement of the cutting tool along the X-axis (perpendicular to the C-axis) according to the rotational angular position around the C-axis of the supported workpiece.
Prior arts are disclosed in next two distributed Japanese Patent publication of Tokkaisho 63-84845 and Tokkai 2001-277072. The former publication discloses the cutting method for the non-circular workpiece for grinding the cam to infeed the cutting tool by the amount of predetermined distances (ΔX) at short angular distances of one revolution of the cam shaft around the C-axis with the C-X profile motion.
The remainder publication discloses the machine tool to input only a value of a compensated parameter except for compensating all original parameters of a pin diameter and a pin stroke of the crankshaft, a diameter of the base portion of cam, and so on where the C-X profile motion is achieved based on the original parameter relating to a distance between the cutting tool and the workpiece according to the rotational angular position of supported workpiece around the C-axis.
It is well known conventional method, as shown in FIG. 1, to transfer and print the profile of a cutting tool 30, in this example the grinding wheel, to an arc recess portion of the workpiece 10 having both end portions 11A and 11C whose diameter of a circumferential surface are gradually larger to form an arc profile, and a central portion 11B whose diameter of the circumferential surface is same. In this conventional method, a width 30W of the cutting tool 30 is almost equal to a longitudinal distance 11W of the crankpin 11 and the profile of the circumferential surface 30A, 30B, 30C of the cutting tool 30 is transferred and copied to the profile of the circumferential surface 11A, 11B, 11C after cutting the workpiece 10 by the cutting tool 30. On this cutting method of the workpiece 10 shown in FIG. 1, the profile of the cutting tool is pre-formed before cutting.
This conventional cutting method is performed by a numerical controller using a program. Plural programs are shown in FIG. 3 and a user-set-program (hereinafter called as user set program) is written as shown in FIG. 3. In FIG. 3, the program comprises a group of user set programs having single or plural user set programs and a group of axis driving programs prepared for each of driven axes. The axis driving program is input an amount of output command (hereinafter called as a control amount) output from a CPU of the numerical controller to a driving unit and the control amount is calculated by the user set program.
The user set program is written a program to calculate the control amount for single or plural axes identified by a user or an operator arbitrarily and therefore the user is free to write the user set program.
The axis driving program is prepared to drive the driving unit for the actual axis, that is a driving motor, and therefore it is corresponded to each of driving units.
Each of driving units is input the control amount (output command) from the correspondent axis driving program and controls in a feedback mode to compensate a difference between an output command and a position or rotational angle et al based on a detected signal from a correspondent position detector.
Where there are a plurality of user set programs, the CPU performs each of user set programs independently and in parallel. The control amount calculated by each of user set programs is input to an axis output program in parallel. Thereby, plural user set programs are simultaneously performed and each axis is controlled simultaneously.
Besides, each axis is identified by only one user set program individually. Therefore, where there are two user set programs PU1, PU2, the user can not identify the X-axis nor the C-axis to calculate the control amount in user set program US2 after the user has identified the X-axis and the C-axis in the user set program US1 to calculate the control amount.
As shown in FIG. 2, the CPU of the numerical controller reads a step N010 and recognizes an identification of a C-X profile motion start mode based on “G51” where “G51” is pre-registered as the C-X profile motion start mode. And also the CPU commands to rotate the crankshaft 10 at 60 rounds per minutes based on the “S60” and it recognizes an command to control a wheel head driving motor to position the surface of the grinding wheel 30 at the position along the X-axis according to the rotational angular position around the C-axis based on datum of the rotational angular position around the C-axis and the position along X-axis registered in a file “P2345” and it also calculates the control amount around C-axis and the control amount along X-axis.
The CPU of the numerical controller reads a next step N020 shown in FIG. 2, it recognizes an infeed mode based on “G01” where “G01” is pre-registered as the infeed mode and recognizes outside positioning mode according to a measured dimension based on “G31” by a sizing device that measures the dimension of the ground portion of the workpiece where “G31” is pre-registered as the outside positioning mode. And the CPU recognizes relative position command mode based on “G91 x−0.2 F1.” where G91 is pre-registered as the relative position command mode and recognizes the command to infeed the grinding wheel 30 along the X-axis in the amount of 0.2 mm by the infeed speed of 1 mm/min, calculates the control amount of the wheel head along X-axis. The amount of “−0.2” means that the grinding wheel 30 is infed toward the crankshaft 10 at the amount of 0.2 mm. The CPU sums the control amount calculated in Step N010 and the control amount calculated in Step N020 to input the resulted amount to an X-axis driving program Pjx. The control amount around C-axis calculated in Step N10 is input to a C-axis driving program Pjc.
Then, the CPU reads a next Step N030 based on an output signal from the sizing device where the output signal is shown in an address 98765.
Next, the CPU reads the Step N030 and recognizes both of the infeed mode and outside positioning command mode based on “G01” and “G31”. Then, it recognizes relative positioning command mode according to “G91” based on “G91 x-0.02 F0.5” and recognizes the command to infeed the wheel head along the X-axis at the amount of 0.02 mm in the infeed speed 0.5 mm/min, calculating the control amount of the wheel head along X-axis. The CPU sums the control amount calculated in Step N010 and the control amount calculated in Step N030 to input the resulted amount to the X-axis driving program Pjx. The control amount around C-axis calculated in Step N10 is input to the C-axis driving program Pjc.
Then, the CPU reads a next Step N040 based on an output signal from the sizing device where the output signal is shown in an address 98764.
Next, the CPU reads a Step N040 and recognizes a sparkout mode based on “G04” where “G04” is pre-registered as the sparkout mode. And, it recognizes the command to perform the sparkout motion at single revolution around the C-axis based on “P1”. The “sparkout” means to position the surface of the grinding wheel to the preset infeed position during stopping the infeed motion of the wheel head in order to perform a sparkout grinding based on a spring back of the workpiece because of the lack of rigidity of a wheel spindle and the workpiece during grinding, causing a final motion to make a smooth surface of the workpiece.
After the CPU performed the sparkout motion at the single revolution, it reads a Step N050 and recognizes a profile motion termination mode based on “G50” where the “G50” is pre-registered as the profile motion termination mode and it stops the C-X profile motion along the X-axis and around the C-axis.
FIG. 4B shows a position chart of the conventional grinding wheel 30 according to the motion “to infeed the cutting tool by the amount of predetermined distances (ΔX) at short angular distances of one revolution of the cam shaft around the C-axis with the C-X profile motion between the C-axis and the X-axis” disclosed in the former publication of Tokkaisho 63-84845. A vertical axis shows the grinding wheel position equaling to a distance between centers of the grinding wheel 30 and the crankshaft 10 and a lateral axis shows the rotational angle of the crankshaft 10 and 2π means one revolution.
On the other hand, FIG. 4A shows the position chart of the conventional grinding wheel 30 during only the C-X profile motion of the C-axis and X-axis without the infeed motion.
As explained the operation of the conventional method, in FIG. 2 is written the C-X profile motion of the C-axis and the X-axis and the infeed motion along X-axis in one user set program. By this operation, as shown in FIG. 4A, it is repeated for the conventional method to infeed the grinding wheel 30 by the predetermined amount of the infeed at short angular distances of one revolution of the cam shaft around the C-axis and this short angular distances is α shown in FIG. 4B. The amount of the infeed is zero during the angular distance β.
The sizing device can not detect any alteration of the profile of the workpiece during the infeed motion so that it should prepared to make less affection of the load changes to the workpiece by shortening times of the infeed motion. In the former publication, however, because the infeed motion is achieved during relatively short distances in a step mode, rapid grinding load occurs so that it should be prepared to set the proper infeed amount and the proper infeed distances, therefore there is an probability to occur any problems to make a roundness worse and to generate a step on the ground surface of the workpiece etc. and another problems to make a consumption of cutting tool larger and its life time shorter.
In the above explained prior art for cutting the crankpin 11 as shown in FIG. 1, it is conventional way to perform the combined method of the transferring and printing method and the contents disclosed in the former publication of Tokkaisho 63-84845 or to perform the combined method of the transferring and printing method and the contents disclosed in the remainder publication of Tokkai 2001-277072.
However, the former publication makes the above-mentioned problem, and the transferring and printing method of the cutting tool 30 needs more labourer to re-dress the profile of the cutting tool 30 in order to re-fit the changed workpiece or to change the cutting tool 30 in a small lot of productions or in the large size of the changed workpiece.
Therefore, the inventors of the present invention think to adjust the change of the profiles and sizes of the crankpin without transferring and copying of the cutting tool 30 if it is achieved to move the cutting tool 30 along the arc profile of the crankpin in Z-axis and X-axis with the C-X profile motion by using the cutting tool having the smaller width 30W compared to a length 11A of the crankpin 11, as shown in FIG. 7. Based on the writing method of the conventional programming, however, it can not write in relation to one axis, for example the X-axis, a plurality of programs of the movement along the X-axis of the C-X profile motion with the movement along X-axis relative to the rotational angular movement around the C-axis, the movement of the infeed motion along the X-axis to grind to a desired size of the diameter of the crankpin, and a movement along the X-axis with the movement along the Z-axis fitting to the arc profile of the crankpin.